#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int count_one_of_bit(unsigned int m)
{
	int count = 0;
	while(m)
	{
		count++;
		m = m & (m - 1);
	}
	return count;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	int ret = count_one_of_bit(n);
	printf("%d\n", ret);
	return 0;
}